package com.bruan.d5_block;

public class Student {
    static int number = 80;
    private static int obNum = 0;
    static {
        //静态代码块 类加载时就执行
        System.out.println("静态代码块执行了----");
    }

    //实例代码块
    {
        obNum++;
        System.out.println("创建了对象"+this+" 当前对象数量为："+obNum);
    }
    public Student(){
        System.out.println("无参构造器执行了");
    }
    public Student(int num){

        number =  num;
        System.out.println("int构造器执行了");
    }

}
